<include file="./Tpl/Home/Header.html" />
<style type="text/css">
.user{width:97%;margin:0px auto;}
.user-nav{}
.user-nav a{display:inline-block;float:left;padding:7px 20px;margin-left:10px;color: #0B72A4;}
.user-nav a.cur{background:#fff;border:1px solid #ddd;border-bottom:0px;}
.user-info{padding:20px 0px;font-size:14px;border:1px solid #ddd;}
.user-info dl{display:block;width:99%;margin:0px auto;zoom:1;overflow:hidden;}
.user-info dl dt,.user-info dl dd{float:left;padding:15px 10px;}
.user-info dl dt{clear:both;width:10%;}
.user-info dl dd{width:70%;}
.user-info dl dd input[type='radio']{margin-left:20px;}
.user-info input[type='text'],.user-info input[type='password']{width:300px;height:30px;line-height:30px;padding:0px 10px;border:1px solid 
#ccc;}
.user-info table{width:100%;border:0px solid #ccc;border-bottom:0px;}
.user-info th,.user-info td{padding:10px 10px;border-bottom:1px solid #ddd;text-align:right;}
.user-info h3{text-indent:15px;padding:15px 0px;}
.sub{display: inline-block;
font-weight: 700;
font-size: 14px;
color: white;
text-align: center;
width: 170px;
height: 32px;
line-height: 32px;
background: #FF8C19;
margin-top: 10px;}
.sub:hover{color:#fff;text-decoration:none;}
/*分页*/
.page{padding:10px;}
.page a{color:#333;fot-size:14px;}
</style>
<div class="marketArea clear">
	<include file="./Tpl/Home/Left.html" />
	<!--<div class="rightArea">
		<div class="user">
		    <include file="./Tpl/Home/Trade_nav.html"/>
			<div class="user-info">
			   <table cellspacing=0 cellpadding=0 border=0>
			       <tr><th width="10%">序号</th><th>币种</th><th>数量</th><th>价格</th><th>总额</th><th>时间</th><th>操作</th></tr>
				   <volist name="list" id="vo" key="k" empty="$empty">
			       <tr><td>{$k}</td><td><eq name="vo.coin" value="kg">{$sys.kgname}<else/>{$sys.ksname}</eq></td><td>{$vo.num|default=0}</td><td>{$vo.price|default=0}</td><td>{$vo.total|default=0}</td><td>{$vo.ctime|date="Y-m-d H:i:s",###}</td><td><eq name="vo.status" value="0"><a class="cancel" data-coin="{$vo.coin}"  data-id="{$vo.id}">撤销委托</a><else/>已完成</eq></td></tr>
				   </volist>
			   </table>
               <div class="page">
			       <a href="{$path}/Trade/buys/page/1">首页</a>
				   <a href="{$path}/Trade/buys/page/{$page-1}">上一页</a>
				   <a href="{$path}/Trade/buys/page/{$page+1}">下一页</a>
				   <a href="{$path}/Trade/buys/page/{$page_num}">尾页</a>
			   </div>
			   <div style="clear:both"></div>
			</div>
		</div>
	</div>-->
    <div class="rightArea">
				<div style="margin-bottom:0px;" class="buysellTitle">
	              <div class="selecttabNew1">
					<ul class="selecttabboxNew">
					
						
						<li class="cur">
							
							<a  class="otherBoxTitle">{$bname}委托管理</a>
							
						</li>
						
					</ul>
			      </div>	
			      </div>
		<div class="entrustTen lasttenorder clear">
			<div class="Tenbody">
				<div class="tenBodyTitle">
					   		  <a onclick="javascript:getEntrust(1,0)" href="?s=Home/Trade/buys/type/0" <eq name="type" value="0"> class="cur"</eq>>未成交</a>
					   		  <a onclick="javascript:getEntrust(1,1)" href="?s=Home/Trade/buys/type/1" <eq name="type" value="1"> class="cur"</eq>>历史委托</a>
				</div>
					<table style="width:100%;">
							<tbody>
								<tr>
									<th width="120">委托时间</th>
									<th width="70">委托类别</th>
									<th width="80">委托数量</th>
									<th width="80">委托金额</th>
									<th width="70">手续费</th>
									<th width="80">委托价格</th>
					
									<th width="75">成交金额</th>
								
									<th width="110">状态</th>
									<th></th>
								</tr>
								<notempty name="list">
								<volist name="list" id="vo">
								
								<tr>
									<td width="120">{$vo.ctime|date="Y-m-d H:i:s",###}</td>
									<td width="70">
										<eq name="vo.type" value="0">卖出</eq>
										<eq name="vo.type" value="1">买入</eq>
									</td>
									<td width="80">{$vo.num}</td>
									<td width="80">{$vo['price']*$vo['num']}</td>
									<td width="70">{$vo.deal}</td>
									<td width="80">{$vo.price}</td>
								
									<td width="75">{$vo['price']*$vo['num']-$vo['num']*$vo['deal']}</td>
									
									<td width="110">
										<eq name="vo.status" value="0">挂单中</eq>
										<eq name="vo.status" value="1">已成交</eq>
									</td>
									<td></td>
								</tr>
								</volist>
								</notempty>
								<empty name="list">
									<tr><td colspan="10" align="center">您暂时没有未成交的挂单。</td></tr>
								</empty>
				
								

							</tbody>
						</table>
			</div>
			<input type="hidden" value="1" id="currentPage">

			<div class="page">
               <a href="{$path}/Trade/buys/{$url}page/1">首页</a>
               <a href="{$path}/Trade/buys/{$url}page/{$page-1}">上一页</a>
               <a href="{$path}/Trade/buys/{$url}page/{$page+1}">下一页</a>
               <a href="{$path}/Trade/buys/{$url}page/{$page_num}">尾页</a>
            </div>
		</div>
   </div>
</div>
<include file="./Tpl/Home/Footer.html" />
<script language="javascript">
$(document).ready(function(){
    $('.cancel').click(function(){
	    var id = $(this).attr('data-id');
		var coin = $(this).attr('data-coin');
		$.post('{$path}/Orders/cancel',{id:id,coin:coin},function(d){
			alert(d.info);
			if(d.status==0){
			    location.reload();
			}
		});
	});
	$(".tenBodyTitle").children("a").on("click",function(){
		$(this).addClass("cur").siblings().removeClass("cur");
	});
});
$(".items2").parent("li").addClass("cur");
$(".bor").eq(0).children("div").addClass("tradeTitlecur").removeClass("tradeTitle");
$(".bor").eq(0).find("span").addClass("trade1cur").removeClass("trade1");
</script>